package com.activemq.spring;

import cn.hutool.core.date.DateUtil;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.jms.core.JmsTemplate;

import java.util.UUID;

public class SpringTest {
    public static void main(String[] args) throws Exception {
        ApplicationContext ioc = new ClassPathXmlApplicationContext("applicationContext.xml");
        JmsTemplate jmsTemplate = ioc.getBean("jmsTemplate", JmsTemplate.class);
        String msg = "spring重试消息" + DateUtil.now() + UUID.randomUUID();
        jmsTemplate.convertAndSend(msg);
    }
}
